/**
 * BrickController
 * 
 * Version 1.0
 *
 * Nov 29th, 2009
 * 
 * Copyright (c) 2009 Duc Nguyen
 */

import java.awt.event.ActionListener;
/**
 * brick controller specifies requirements for concrete brick controllers
 * @author Duc Nguyen
 *
 */

public abstract class BrickController implements ActionListener {
	/** the model */
	private BrickModel model;
	/** the brick frame */
	private BrickFrame frame;
	/** the command processor */
	private CommandProcessor commandProcessor;
	
	/**
	 * Constructor
	 * @param frame	the brick frame
	 */
	BrickController(BrickFrame frame){
		this.frame = frame;
		this.model = frame.getModel();
		this.commandProcessor = frame.getCommandProcessor();
	}
	
	/**
	 * @return the command processor
	 */
	public CommandProcessor getCommandProcessor() {
		return commandProcessor;
	}

	/**
	 * @return the model
	 */
	public BrickModel getModel() {
		return model;
	}
	
	/**
	 * @return	the brick frame
	 */
	public BrickFrame getFrame(){
		return frame;
	}
	
	/**
	 * to String
	 */
	public String toString(){
		return "Brick Controller";
	}




}
